<?php
use app\components\TopMenu;
?>

<div>
    <!--begin调用的是init方法-->
    <!--end()调用的是run方法-->
    <?php $menu = TopMenu::begin();?>
        <?php echo $menu->addMenu("菜单1");?>
        <?php echo $menu->addMenu("菜单2");?>
        <?php echo $menu->addMenu("菜单3");?>
        <?php echo $menu->addMenu("菜单4");?>
    <?php TopMenu::end();?>
</div>
